import axios from 'axios';

export const getComplaintList = (params) => {
  return axios.post('/demandComplaint/getDemandComplaintList', params);
};

export const deleteComplaint = (params) => {
  return axios.post('/demandComplaint/delete', params);
};

export const getExpertList = () => {
  return axios.get('/demandComplaint/getExpertList');
};

export const assignComplaint = (params) => {
  return axios.post('/demandComplaint/saveDemandComplaint', params);
};


// 获取详情
export const getComplaintDetail = (params) => {
  return axios.get('/demandComplaint/getDetail',{params: params});
};


//关闭投诉单
export const closeComplaint = async (data) => {
  const response = await axios.post(`/demandComplaint/close`, data);
  return response.data;
};